package com.ajs.multipledatasources.service;

import com.ajs.multipledatasources.dao.StudentDao;
import com.ajs.multipledatasources.datasource.DS;
import com.ajs.multipledatasources.datasource.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ajs.multipledatasources.entity.Student;

@Service

public class StudentService {
	@Autowired
	private StudentDao ts1;

	@Transactional
	@DS(DataSourceType.DataBaseType.TEST01)
	public void addStudent(Student t) {
		ts1.save(t);
	}

}
